export default {
    // 修改登录的状态
    changeUserInfo(state, payload) {
        for (let key in payload) {
            state[key] = payload[key];
        }
    },

    //手动删除token,切换导航后还原默认用户信息
    //初始化用户的信息
    initUserInfo(state, payload) {
        state.cartTotal = 0, //购物车数量
        state.userInfo = {
            nickName: "xxx",
            coin: "--",
            headImg: require("@/assets/images/userImg.f8bbec5e.png"),
        } //用户信息
    }
}